<? if( $_SESSION[ "JC_account_authority" ] ) { ?>

	<div
		style		= "position: fixed; padding: 15px; left: <?= $_SESSION[ "JC_menu" ] ? "0" : "-165" ?>px; top: 0px; width: 150px; height: 100%; background-color: black;"
		onmouseover	= "this.style.left='0px';"
		onmouseout	= "if( ! document.getElementById( 'JC_menu' ).value ) this.style.left='-165px';"
	>

		<a href="?" class="white bold form"><?= $JC_database_database ?></a><br /><hr />



		<!-- Database -->

			<? if( $_SESSION[ "JC_account_authority" ] == "administrator" || $_SESSION[ "JC_account_authority" ] == "observer" ) { ?>

				<? foreach( $_SESSION[ "JC_scheme" ] as $key => $value ) { ?>

					<? if( $_SESSION[ "JC_account_authority" ] == "administrator" ) { ?>

						<a href="?JC_table=<?= $key ?>&JC_mode=select" title="Select <?= ucwords( $key ) ?>" class="white form">▥</a>
						<a href="?JC_table=<?= $key ?>&JC_mode=update" title="Update <?= ucwords( $key ) ?>" class="white form">▦</a>
						<a href="?JC_table=<?= $key ?>&JC_mode=insert" title="Insert <?= ucwords( $key ) ?>" class="white form">▤</a>

					<? } ?>

					<span class="small"><?= sprintf( "%02d", $value[ "key" ][ "priority" ] ) ?></span>

					<a href="?JC_table=<?= $key ?>" title="<?= $_SESSION[ "JC_scheme" ][ $key ][ "comment" ]?>" class="white form"><?= ucwords( $key ) ?></a>

					<br />

				<? } ?>

				<hr />

			<? } ?>	



		<!-- Function -->

			<? if( $_SESSION[ "JC_account_authority" ] == "administrator" ) { ?>

				<a href="?JC_file=21_import"	class="white form">Import	</a><br />
				<a href="?JC_file=22_export"	class="white form">Export	</a><br />
				<a href="?JC_file=29_file"		class="white form">File		</a><br /><hr />

			<? } ?>

			<a href="?JC_file=99_account"		class="white form">Account		</a><br />
			<a href="?JC_file=99_task"			class="white form">Task			</a><br />
			<a href="?JC_file=99_translation"	class="white form">Translation	</a><br /><hr />



		<!-- Account -->

			<div style="position: absolute; margin-left: -15px; margin-top: -100px; left: 0px; top: 100%; width: 100%; text-align: right;">

				<b><?= $_SESSION[ "JC_account_name" ] ?></b><br class="form" />

				<?= ucwords( $_SESSION[ "JC_account_authority" ] ) ?><br /><hr />

				<a href="?JC_query=LO" class="white form">Log Out</a>

			</div>



		<!-- Pin -->

			<input
				type		= "checkbox"
				id			= "JC_menu"
				style		= "position: absolute; margin-top: -57px; left: 12px; top: 100%;"
				onchange	= "
					if( this.value )	document.getElementById( 'JC' ).style.marginLeft = '165px';
					else				document.getElementById( 'JC' ).style.marginLeft = '0px';
					JC_session( 'JC_menu', this.value );
				"
				<?= $_SESSION[ "JC_menu" ] ? "checked" : "" ?>
			/>



	</div>

<? } ?>
